package com.lantosec.hmrp.modules.morality.vo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlanLevel;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评方案等级 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityPlanLevel对象", description="考评方案等级")
public class MoralityPlanLevelVO extends BaseVO<MoralityPlanLevel> {
    private static final long serialVersionUID = 1L;


    public MoralityPlanLevelVO(MoralityPlanLevel entity){
        this.moralityPlanLevelId = entity.getMoralityPlanLevelId();
        this.moralityPlanId = entity.getMoralityPlanId();
        this.moralityLevelId = entity.getMoralityLevelId();
        this.moralityLevelName = entity.getMoralityLevelName();
        this.minScore = entity.getMinScore();
        this.maxScore = entity.getMaxScore();
        this.peopleLimit = entity.getPeopleLimit();
        this.deptPecent = entity.getDeptPecent();
        this.branchPecent = entity.getBranchPecent();
        this.committeePecent = entity.getCommitteePecent();
    }

    @Override
    public MoralityPlanLevel convertToEntity(){
        return new MoralityPlanLevel(this);
    }


    @ApiModelProperty(value = "主键ID")
    @TableId(value = "morality_plan_level_id", type = IdType.AUTO)
    private Integer moralityPlanLevelId;

    @ApiModelProperty(value = "考评方案ID")
    private Integer moralityPlanId;

    @ApiModelProperty(value = "考评等级ID")
    private Integer moralityLevelId;

    @ApiModelProperty(value = "考评等级名称")
    private String moralityLevelName;

    @ApiModelProperty(value = "最小分值")
    private BigDecimal minScore;

    @ApiModelProperty(value = "最大分值")
    private BigDecimal maxScore;

    @ApiModelProperty(value = "是否限制人数(0否 1是)")
    private Integer peopleLimit;

    @ApiModelProperty(value = "科室考评环节人数比上限")
    private Integer deptPecent;

    @ApiModelProperty(value = "党支部考评环节人数比上限")
    private Integer branchPecent;

    @ApiModelProperty(value = "考评委员会环节人数比上限")
    private Integer committeePecent;
}
